package com.example.demo.handler;

import xyz.erupt.upms.model.EruptUser;

import java.util.IdentityHashMap;
import java.util.Map;

public class LoginProxy implements xyz.erupt.upms.fun.LoginProxy {

    /**
     * 只允许某个账号在单机上操作
     */
    public static final Map<String, String> tokens = new IdentityHashMap<>();

    @Override
    public void loginSuccess(EruptUser eruptUser, String token) {
        xyz.erupt.upms.fun.LoginProxy.super.loginSuccess(eruptUser, token);
        tokens.put(eruptUser.getAccount(), token);
    }
}
